<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 华哥
  Date: 2021/5/10
  Time: 20:00
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>

<head>
    <title>湖南省长沙市华子医院</title>

    <%
        //获取项目的根路径
        String path = request.getContextPath();
        String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
    %>

    <script type="text/javascript" src="<%=basePath%>static/swee/sweetalert-dev.js"></script>

    <style type="text/css">

        * {
            margin: 0;
            padding: 0;
        }

        #background-image {
            width: 100%;
            height: 600px;
            border: 1px transparent solid;
            background: url("<%=basePath%>static/img/doctorLogin/back.jpg") no-repeat;
            opacity: 0.8;
        }

        .login-box {
            width: 300px;
            height: 300px;
            text-align: center;
            margin: 160px auto auto;
            background: white;
            padding-top: 3px;
            border-radius: 10px 10px 10px 10px;
        }

        .login-box h3 {
            color: #75a2f1;
        }

        .biao p input {
            width: 220px;
            height: 30px;
            border: 1px solid #909090;
        }

        .biao img, .input {
            vertical-align: middle;
        }

        .head img, span {
            vertical-align: middle;
            font-size: 35px;
            color: black;
            font-family: "隶书", serif;
        }

        .biao img {
            border: 1px solid #909090;
            border-right: none;
        }

        .biao input[type="submit"] {
            background: #7eb941;
            color: white;
            height: 40px;
            font-size: 20px;
            border-radius: 5px 5px 5px 5px;
        }

        .car-pwd {
            margin-left: 150px;
        }

        #jiejian span {
            color: #9F9F9F;
            font-size: 12px;
            font-family: "微软雅黑", serif;
        }

        #jiejian {
            font-size: 12px;
        }

        #jiejian a {
            text-decoration: none;
        }

        ul li {
            list-style: none;
            float: left;
            margin-left: 5px;
        }

        .yang {
            border-right: 1px solid #9F9F9F;
            width: 250px;
        }

        ul li span {
            color: #9F9F9F;
            font-family: "微软雅黑", serif;
            font-size: 13px;
        }

        ul li h3 {
            margin-bottom: 0;
            margin-top: 20px;
        }

        ul {
            margin-top: 20px;
            margin-left: 20px;
        }

        ul img {
            margin-left: 20px;
            margin-right: 20px;
        }

        .head {
            width: 100%;
            height: 80px;
            background: white;
            position: absolute;
            z-index: 10;
            opacity: 0.8;
        }

        .login-box h3 {
            margin-top: 20px;
        }

    </style>

    <link rel="stylesheet" type="text/css" href="<%=basePath%>static/swee/sweetalert.css">

</head>
<body>

<input type="hidden" id="flag" value="${requestScope.failing}">

<div class="head">
    <img src="<%=basePath%>static/img/doctorLogin/logo.png" height="80px"> <span>湖南省长沙市华子医院</span>
</div>

<div id="background-image">

    <div class="login-box">

        <h3 class="title">登录</h3><br>

        <form action="<%=basePath%>doctorLogin/login" method="post" class="biao">
            <p>
                <img src="<%=basePath%>static/img/doctorLogin/userName.png" width="30px" height="28px">
                <input type="text" name="userName" placeholder="用户名" class="input">
            </p>
            <br>
            <p>
                <img src="<%=basePath%>static/img/doctorLogin/pwd.png" width="30px" height="28px">
                <input type="password" name="userPwd" placeholder=" 密码" class="input">
            </p>
            <br>
            <p><input type="submit" value="登录"></p>
            <a href="<%=basePath%>doctorLogin/toUpdPwd" class="car-pwd">忘记密码? </a>
        </form>
        <br>
        <p id="jiejian">
            <span>登录即代表您已阅读并同意</span><a href="#">《微医用户注册协议》</a><br><a href="#">《法律声明》</a>
            <a href="#">《隐私权政策》</a>
        </p>
    </div>

</div>

<ul>
    <li><img src="<%=basePath%>static/img/doctorLogin/hg.png" width="80px" height="80px"></li>
    <li class="yang">
        <h3>专业的平台</h3>
        <span>三甲医院号源直供、服务挂号上亿人次</span>
    </li>
    <li><img src="<%=basePath%>static/img/doctorLogin/ys.png" width="70px" height="70px"></li>
    <li class="yang">
        <h3>知名医生</h3>
        <span>知名医疗资源、精诚解决您的疑难杂症</span>
    </li>
    <li><img src="<%=basePath%>static/img/doctorLogin/xx.png" width="70px" height="70px"></li>
    <li class="yang">
        <h3>权威的问诊</h3>
        <span>多样化问诊模式、快速精准解答问题</span>
    </li>
    <li><img src="<%=basePath%>static/img/doctorLogin/jk.png" width="70px" height="70px"></li>
    <li class="yang">
        <h3>全面健康医院</h3>
        <span>只为提供最优质的服务~华子医院</span>
    </li>
</ul>

<script type="text/javascript">
    let flag = document.getElementById("flag").value;
    if (flag != "" && flag != null) {
        if (flag == "false") {
            swal("登录失败!", "用户名或密码错误！");
        }
    }
</script>

</body>
</html>
